<template>
  <div>
    <el-dialog
      @close="changeDialogShow(false)"
      v-model="brandItemData.show"
      :title="brandItemData.title ? '修改品牌' : '新增品牌'"
    >
      <el-form
        style="width: 90%"
        :model="brandItemData"
        ref="formRef"
        :rules="rules"
      >
        <el-form-item label="品牌名称" label-width="100px" prop="tmName">
          <el-input
            placeholder="请输入品牌名称"
            v-model="trademarkParams.tmName"
            
          ></el-input>
        </el-form-item>
        <el-form-item label="品牌LOGO" label-width="100px" prop="logoUrl">
          <el-upload
            class="upload-logo"
            drag
            action="/api/admin/product/fileupload"
            :show-file-list="false"
            :on-success="handleLogoImageSuccess"
            :before-upload="beforeLogoImageUpload"
          >
            <img
              :src="trademarkParams.logoUrl"
              v-if="trademarkParams.logoUrl"
            />
            <el-icon v-else class="logo-image-icon">
              <Plus />
            </el-icon>
          </el-upload>
        </el-form-item>
        <template #footer>
          <el-button type="primary" size="default" @click="cancel">
            取消
          </el-button>
          <el-button type="primary" size="default" @click="confirm">
            确定
          </el-button>
        </template>
      </el-form>
    </el-dialog>
  </div>
</template>

<script setup lang="ts"></script>

<style scoped></style>
